package com.jixiantubu.luntan;

import java.util.ArrayList;
import java.util.List;

import com.example.jixiantubu.R;
import com.jixiantubu.adapter.TupianAdapter;
import com.jixiantubu.bean.Wo_Data;
import com.jixiantubu.util.MyApplication;
import com.lidroid.xutils.HttpUtils;

import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.TextView;

public class TuPianFragment extends Fragment implements OnClickListener {
	View view;
	ImageView imageView1,imageView2,imageView3,imageView4;
	TextView textView1,textView2,textView3,textView4;
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		view = inflater.inflate(R.layout.tupian, null);
		initViews();
		initData();
		return view;
	}

	private void initData() {
	}

	private void initViews() {
		imageView1=(ImageView) view.findViewById(R.id.luntan_luntanimg);
		imageView2=(ImageView) view.findViewById(R.id.luntan_kepuimg);
		imageView3=(ImageView) view.findViewById(R.id.luntan_youjiimg);
		imageView4=(ImageView) view.findViewById(R.id.luntan_wodeimg);
		imageView1.setOnClickListener(this);
		imageView2.setOnClickListener(this);
		imageView3.setOnClickListener(this);
		imageView4.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		Intent intent;
	switch (v.getId()) {
	case R.id.luntan_luntanimg:
		intent = new Intent(getActivity(),
				LuntanTupianActivity.class);
		startActivity(intent);
		break;
case R.id.luntan_kepuimg:
	intent = new Intent(getActivity(),
			KepuTuijianTupianActivity.class);
	startActivity(intent);
		break;
case R.id.luntan_youjiimg:
	intent = new Intent(getActivity(),
			YoujiTupianActivity.class);
	startActivity(intent);
	break;
case R.id.luntan_wodeimg:
	intent = new Intent(getActivity(), WodeTupianActivity.class);
	startActivity(intent);
	break;

	default:
		break;
	}
		
	}

	

}
